Bump to cap-std 0.25 and io-lifetimes 0.7
authorColin Walters <walters@verbum.org>
Thu, 23 Jun 2022 18:25:42 +0000 (14:25 -0400)
committerColin Walters <walters@verbum.org>
Thu, 23 Jun 2022 18:59:03 +0000 (14:59 -0400)
Prep for bumping ostree-rs-ext, which will help bump rpm-ostree,
which will get it out of having two copies of rustix.

Cargo.toml
rust-bindings/src/repo.rs

index f4544b3928e1033c563070bc7e763f81cf4b9217..4b865f2e03c29a9134d3c1d9fb63109acffc132a 100644 (file)
@@ -38,8 +38,8 @@ members = [".", "rust-bindings/sys"]
 
 [dependencies]
 bitflags = "1.2.1"
-cap-std = { version = "0.24", optional = true}
-io-lifetimes = { version = "0.5", optional = true}
+cap-std = { version = "0.25", optional = true}
+io-lifetimes = { version = "0.7", optional = true}
 ffi = { package = "ostree-sys", path = "rust-bindings/sys", version = "0.10.0" }
 gio = "0.14"
 glib = "0.14.4"
@@ -53,7 +53,7 @@ thiserror = "1.0.20"
 maplit = "1.0.2"
 openat = "0.1.19"
 tempfile = "3"
-cap-tempfile = "0.24"
+cap-tempfile = "0.25"
 
 [features]
 cap-std-apis = ["cap-std", "io-lifetimes", "v2017_10"]
index a8ddbca1b892805c2f94ef49135b880b629ea2b0..6947f49b7d2bdde5b078531f00807dca3c51b75f 100644 (file)
@@ -154,13 +154,15 @@ impl Repo {
     /// Borrow the directory file descriptor for this repository.
     #[cfg(feature = "cap-std-apis")]
     pub fn dfd_borrow(&self) -> io_lifetimes::BorrowedFd {
-        unsafe { io_lifetimes::BorrowedFd::borrow_raw_fd(self.dfd()) }
+        unsafe { io_lifetimes::BorrowedFd::borrow_raw(self.dfd()) }
     }
 
     /// Return a new `cap-std` directory reference for this repository.
     #[cfg(feature = "cap-std-apis")]
     pub fn dfd_as_dir(&self) -> std::io::Result<cap_std::fs::Dir> {
-        cap_std::fs::Dir::reopen_dir(&self.dfd_borrow())
+        use io_lifetimes::AsFd;
+        let dfd = self.dfd_borrow();
+        cap_std::fs::Dir::reopen_dir(&dfd.as_fd())
     }
 
     /// Find all objects reachable from a commit.